Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

use smaller Docker networks #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

use smaller Docker networks #40

wants to merge 1 commit into from

Conversation

japaric
Copy link
Collaborator

@japaric japaric commented Mar 11, 2024

as we can't ask docker to pick a random /24 subnet for us we randomly choose a /24 subnet from the address space Docker would normally use

closes #17

as we can't ask docker to pick a random /24 subnet for us we randomly
choose a /24 subnet from the address space Docker would normally use

#[test]
fn stress() {
let mut networks = vec![];
Copy link
Collaborator

@justahero justahero May 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test fails on my Macbook. There are 5 other Docker networks present unrelated to this project when I run this test.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are those networks created by default in a fresh macOS installation? what are their subnet masks? perhaps we should docker network inspect the output of docker network ls and use the subnet masks not shown there.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the collection of information on my Macbook.

$ docker network ls
NETWORK ID     NAME                             DRIVER    SCOPE
71ce00f0ea3c   bridge                           bridge    local
4ddc8f3c484c   customer-portal_cp_net           bridge    local
eb3ec8e5c769   download-server_criticalup_net   bridge    local
05a125eec965   host                             host      local
e40dd388a572   none                             null      local

Subnet masks for the first three entries are:

172.17.0.0/16
172.20.0.0/16
172.21.0.0/16

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spawning too many Networks makes Network::new() fail
2 participants